uiHeight = screen.availHeight;
uiWidth = screen.availWidth;

var sampleApp = new BApplication("application/x-vnd.Softsurve-HelloWorld");

sampleApp.Init = function()
{
	//create a toolbar
	mainBarFrame = new BFrame(0,0,40,uiWidth);
	mainBar = new ToolBar(mainBarFrame,"A Toolbar");	
	//create and add menu items	
	
	//an example fatty
	var frame = new BFrame(100,90, 300 , 300);
	var awindow = new BDirectWindow(frame,"a fatty","fatty","NO_TITLE",0);
	awindow.innnerHTML = "this is a fatty";	
	awindow.Show();	
	
	//an example window
	var frame1 = new BFrame(300,40, 300 , 300);
	var window1 = new BDirectWindow(frame1,"a window","fatty",0,0);
	window1.Show();	
};


sampleApp.Draw = function()
{
		
	
};

sampleApp.Pulse = function()
{
	
	
};

function uiTest()
{
	peyote.init();

	sampleApp.Init();
	
	sampleApp.Draw();
	sampleApp.Pulse();
	
};